/**
 * Input prompt example
 */

//'use strict';
var fs = require('fs');
//   conf=require('./webpack.base.conf')


//对json文件作增删改
/*function operate() {
 fs.readFile('./package.json', function (err, data) {
 if (err) throw err;
 var jsonObj = JSON.parse(data);
 jsonObj['bin']['nui'] = "./bin/a";
 jsonObj['bin']['nui-start'] = "./bin/nui";
 jsonObj['author'] = "zi";
 fs.writeFile('./package.json', JSON.stringify(jsonObj, null, '  '), function (err) {
 if (err) throw err;
 console.log("done!")bu
 });
 });
 }*/
function operate() {
    var stream=fs.createReadStream('./lib/webpack.base.conf.js');
  stream.on('data',function () {

  })
    // var obj = JSON.parse(conf);;

    conf.entry.app = make;
    console.log(conf);
    fs.writeFile('./lib/webpack.base.conf.js', JSON.stringify(conf, null, '  '), function (err) {
        if (err) throw err;
        console.log("done!")
    });
    // jsonObj['bin']['nui'] = "./bin/a";
    //jsonObj['bin']['nui-start'] = "./bin/nui";
    /*    jsonObj['author'] = "zi";
     fs.writeFile('./package.json', JSON.stringify(jsonObj, null, '  '), function (err) {
     if (err) throw err;
     console.log("done!")
     });*/
}
operate();
//对js文件作增删改
//module.exports=operate;
/*//添加指定内容到文件
 function add() {

 }
 //删除指定文件内容
 function del() {

 }
 //修改指定文件内容
 function edit() {

 }*/







